home *** CD-ROM | disk | FTP | other *** search
/ Amiga Tools 2 / Amiga Tools 2.iso / tools / packer / ha0999beta / src / error.h < prev    next >
C/C++ Source or Header  |  1995-03-09  |  3KB  |  55 lines

  1. /***********************************************************************
  2.   This file is part of HA, a general purpose file archiver.
  3.   Copyright (C) 1995 Harri Hirvola
  4.  
  5.   This program is free software; you can redistribute it and/or modify
  6.   it under the terms of the GNU General Public License as published by
  7.   the Free Software Foundation; either version 2 of the License, or
  8.   (at your option) any later version.
  9.  
  10.   This program is distributed in the hope that it will be useful,
  11.   but WITHOUT ANY WARRANTY; without even the implied warranty of
  12.   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  13.   GNU General Public License for more details.
  14.  
  15.   You should have received a copy of the GNU General Public License
  16.   along with this program; if not, write to the Free Software
  17.   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  18. ************************************************************************
  19.     HA error hadling 
  20. ***********************************************************************/
  21.  
  22. #define    ERR_UNKNOWN    1    /* Unknown error             */
  23. #define ERR_NOTIMP    2    /* Command not implemented         */
  24. #define ERR_ARCOPEN    3    /* Could not open archive        */
  25. #define ERR_MEM        4    /* Out of memory            */
  26. #define ERR_NOHA    5    /* Not a ha archive            */
  27. #define ERR_WRITE    6    /* Write error                */
  28. #define ERR_READ    7    /* Read error                 */
  29. #define ERR_INT        8    /* Got signal...            */
  30. #define ERR_NOFILES    9    /* No files found            */
  31. #define ERR_REMOVE    10    /* Could not remove             */
  32. #define ERR_INVSW    11    /* Invalid switch            */
  33. #define ERR_TOONEW    12    /* Version identifier too high        */
  34. #define ERR_TOOOLD    13    /* Version identifier too old        */
  35. #define ERR_UNKMET    14    /* Unknown compression method        */
  36. #define ERR_SEEK    15    /* Lseek error                */
  37. #define ERR_OPEN    16    /* Could not open file            */
  38. #define ERR_MKDIR    17    /* Could not make directory        */
  39. #define ERR_CRC        18    /* CRC error                 */
  40. #define ERR_WRITENN    19    /* Write error (no name)        */
  41. #define ERR_STAT    20    /* Stat failed                */
  42. #define ERR_DIROPEN     21      /* Open dir                             */
  43. #define ERR_CORRUPTED   22      /* Corrupted archive                    */
  44. #define ERR_SIZE        23      /* Wrong data type size                 */
  45. #define ERR_HOW         24      /* How to handle                        */
  46. #define ERR_RDLINK      25      /* Readlink() error                     */
  47. #define ERR_MKLINK      26      /* Symlinklink() error                  */
  48. #define ERR_MKFIFO      27      /* Mkfifo() error                       */
  49.  
  50. extern int inerror;        /* Current error value */
  51. extern int lasterror;           /* Last error value */
  52.  
  53. void error(int fatal, int number, ...);
  54.  
  55.